package cn.wolfcode.luowowo.acticle.mapper;


import cn.wolfcode.luowowo.acticle.domain.TravelTag;
import cn.wolfcode.luowowo.common.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TravelTagMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TravelTag record);

    TravelTag selectByPrimaryKey(Long id);

    List<TravelTag> selectAll();

    int updateByPrimaryKey(TravelTag record);

    List<TravelTag> selectForList(QueryObject qo);

    /**
     * 删除关系
     * @param travelId
     */
    void deleteRelation(Long travelId);

    /**
     * 查询tag是否存在
     * @param tag
     * @return
     */
    TravelTag selectTagByName(String tag);

    /**
     * 添加关系
     * @param tagId
     * @param travelId
     */
    void insertRelation(@Param("tagId") Long tagId, @Param("travelId") Long travelId);

    List<String> selectTagByTravelId(Long travelId);
}